﻿namespace StringsAndTextProcessing
{
    using System;

    class ExtractingURL
    {
        // 1.2.13.12. Write a program that parses an URL address given in the format:
        // [protocol]://[server]/[resource]
        // and extracts from it the [protocol], [server] and [resource] elements. For example from
        // the URL http://www.devbg.org/forum/index.php the following information should be extracted:
        // [protocol] = "http"
        // [server] = "www.devbg.org"
        // [resource] = "/forum/index.php"

        static void Main()
        {
            Uri url = new Uri("http://www.devbg.org/forum/index.php");
            Console.WriteLine(url.Scheme);
            Console.WriteLine(url.Host);
            Console.WriteLine(url.AbsolutePath);
        }
    }
}